package com.smart.community.feign.security;

import com.smart.community.commons.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 安防服务Feign降级处理
 * 
 * @author Wu.Liang
 */
@Slf4j
@Component
public class SecurityFeignClientFallback implements SecurityFeignClient {
    
    @Override
    public Result<?> getAccessRecords(Long userId) {
        log.warn("门禁服务调用失败，用户ID: {}", userId);
        return Result.fail("门禁服务暂时不可用");
    }
    
    @Override
    public Result<?> getAlarmRecords(Long userId) {
        log.warn("报警服务调用失败，用户ID: {}", userId);
        return Result.fail("报警服务暂时不可用");
    }
    
    @Override
    public Result<?> getMonitorInfo(Long userId) {
        log.warn("监控服务调用失败，用户ID: {}", userId);
        return Result.fail("监控服务暂时不可用");
    }
} 
